package com.hubu.list;
class MyVisitor<Integer> implements Visitor<Integer>{
    @Override
    public boolean visitor(SingleList.SingleNode<Integer> head) {
        return false;
    }
}
public class ListTest {
    public static void main(String[] args) {
        testSingleList();
    }
    public static void testSingleList(){
        SingleList<Integer> list=new SingleList<>(null,null);
        list.add(12);
        list.add(13);
        list.add(14);
        list.add(15);
        list.add(16);
        Iterator<Integer> iterator = list.iterator();
        while(iterator.hasNext()){
            Integer value = iterator.next();
            System.out.println(value);
        }
    }
}
